CC = g++
CXXFLAGS = -O3 -Wall -Isrc
LDFLAGS = -lSDL -lSDL_ttf -lSDL_gfx -lSDL_mixer -lSDL_image

BIN = $(addprefix bin/, messy_battle)
OBJ = $(addprefix src/, \
		components/Sprite.o components/Animation.o \
		control/GameManager.o control/InputManager.o control/CollisionManager.o \
		core/messy.o \
		objects/GameObject.o objects/Player.o objects/Catherine.o \
		states/SplashState.o states/ArenaState.o states/EndState.o)

all: $(BIN)

clean:
	rm -f $(BIN)
	rm -f $(OBJ)

$(BIN): $(OBJ)
	$(CC) $(LDFLAGS) -o $@ $^

depend:
	makedepend -m -Y src/*/*.cpp 2> /dev/null

# DO NOT DELETE

src/components/Animation.o: src/components/Animation.h
src/components/Animation.o: src/components/Sprite.h
src/components/Sound.o: src/components/Sound.h
src/components/Sprite.o: src/components/Sprite.h
src/components/TimeCounter.o: src/components/TimeCounter.hpp
src/control/CollisionManager.o: src/control/CollisionManager.h
src/control/GameManager.o: src/control/InputManager.h
src/control/GameManager.o: src/control/GameManager.h
src/control/InputManager.o: src/control/InputManager.h
src/control/NetworkManager.o: src/control/NetworkManager.h
src/control/NetworkManager.o: src/network/network.h
src/control/NetworkManager.o: src/network/log_controller.h
src/control/NetworkManager.o: src/network/global.h
src/control/NetworkManager.o: src/network/server_network.h
src/control/NetworkManager.o: src/network/network.h
src/core/lab3.o: src/core/utils.h src/control/GameManager.h
src/core/messy.o: src/core/utils.h
src/network/log_controller.o: src/network/log_controller.h
src/network/network.o: src/network/network.h
src/network/server_network.o: src/network/server_network.h
src/network/server_network.o: src/network/global.h src/network/network.h
src/objects/Catherine.o: src/objects/Catherine.h src/objects/FireBall.h
src/objects/Catherine.o: src/objects/GameObject.h src/objects/Player.h
src/objects/GameObject.o: src/objects/GameObject.h
src/objects/Player.o: src/objects/Player.h src/objects/GameObject.h
src/objects/TextObject.o: src/objects/TextObject.h src/core/utils.h
src/states/ArenaState.o: src/states/ArenaState.h src/states/State.h
src/states/EndState.o: src/states/EndState.h src/states/State.h
src/states/SplashState.o: src/states/SplashState.h src/states/State.h
